<!--#INCLUDE FILE="config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" href="../css/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.21.custom.min.js"></script>
<script language='JavaScript'>
	function refreshParent() {
		window.opener.location.href = window.opener.location.href;
		if (window.opener.progressWindow) {
			window.opener.progressWindow.close()
		}
		window.close();
	}
</script>
				
</head>
<%
lblSucces = ""

code = Request("code")

if (Request("extday") <> "") then

	extday = Request("extday")
	code = Request("codeId")
	
	set objConnect = server.createObject("ADODB.Connection")       
			objConnect.open conStr
			
			Set oCmd = Server.CreateObject("ADODB.Command")
			  
				oCmd.ActiveConnection = objConnect
				oCmd.CommandText = "sp_extend_days" 
				oCmd.CommandType = 4
				
				Set extDay = oCmd.CreateParameter("@day", 200,1,100, extday)
				oCmd.Parameters.Append extDay
				
				Set codeID = oCmd.CreateParameter("@code", 200,1,100, code)
				oCmd.Parameters.Append codeID
				
				set rss = oCmd.execute

				lblSucces = "You extended successfull!"
end if
%>

<body>
<h2>Code is expired. Please Extend code!</h2>
<form action="FEI_Extend_Offer.asp" method="POST" name="extend" id="extend">
	<label>Day Extend:</label>
	<input type="text" name="extday" id="extday" size="5"/> Days
	<input type="hidden" id="codeId" name="codeId" value="<%=code%>" />
	<input type="submit" value="Extend" name="submit"/><br /><br /><br /><br />
</form>

<%
		if (lblSucces <> "") then%>
			<script language='JavaScript'>
				$(function() {
					$("#extend").css('display','none');
				});
			</script>
			
			<label><b><%=lblSucces%></b></label><br />
	<%end if%>
</body>
</html>